package com.qf.service.impl;

import com.qf.dao.UserDao;
import com.qf.pojo.User;
import com.qf.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("userService")
public class UserServiceImpl implements UserService {
    @Autowired(required = false)
    private UserDao userDao;
    @Override
    public List<User> selectA11() {
        return userDao.selectAll();
    }

    @Override
    public int delete(List alist) {
        return userDao.delete(alist);
    }

    @Override
    public User selectOne(int id) {
        return userDao.selectOne(id);
    }

    @Override
    public int update(User user) {
       /* System.out.println("sss:"+user);*/
        return userDao.update(user);

    }

    @Override
    public int insert(User user) {
        return userDao.insert(user);
    }

    @Override
    public User selectOneByNamePassword(String name, String pass) {
        return userDao.selectOneByNamePassword(name,pass);
    }

    @Override
    public int insertShow(User user) {
        return userDao.insertShow(user);
    }
}
